package android.app.gfestival.rss;

import android.db.Column;
import android.db.Persistence;
import android.db.Table;

@Table(name="RSSItem")
public class RSSItem extends Persistence{
	public RSSItem() {
	}
	@Column(name="title")
	public String _title;
	@Column(name="description")
	public String _description;
	@Column(name="link")
	public String _link;
	@Column(name="image")
	public String _image;
	@Column(name="category")
	public String _category;
	@Column(name="pubdate")
	public String _pubdate;


	public void setTitle(String title) {
		_title = title;
	}

	public void setDescription(String description) {
		_description = description;
	}

	public void setLink(String link) {
		_link = link;
	}

	public void setCategory(String category) {
		_category = category;
	}

	public void setPubDate(String pubdate) {
		_pubdate = pubdate;
	}

	public String getTitle() {
		return _title;
	}

	public String getDescription() {
		return _description;
	}

	public String getLink() {
		return _link;
	}

	public String getCategory() {
		return _category;
	}

	public String getPubDate() {
		return _pubdate;
	}

	public String toString() {
		// limit how much text we display
		if (_title.length() > 42) {
			return _title.substring(0, 42) + "...";
		}
		return _title;
	}

	public void setImage(String _image) {
		this._image = _image;
	}

	public String getImage() {
		return _image;
	}
}
